From: Florian Müllner Date: Mon, 3 Nov 2025 11:49:12 +0000 (+0100) Subject: js: Always use SOURCE_CONTINUE/SOURCE_REMOVE in later handlers X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~44^2~136 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9fc7f3f439ae95646882dd8b60d08003a38daaf5;p=gnome-shell.git js: Always use SOURCE_CONTINUE/SOURCE_REMOVE in later handlers The constants are more self-explanatory (and therefore readable) then plain true/false. Part-of: --- diff --git a/js/gdm/authList.js b/js/gdm/authList.js index 6aa21a5f6..30d8c25f0 100644 --- a/js/gdm/authList.js +++ b/js/gdm/authList.js @@ -16,6 +16,7 @@ */ import Clutter from 'gi://Clutter'; +import GLib from 'gi://GLib'; import GObject from 'gi://GObject'; import Meta from 'gi://Meta'; import St from 'gi://St'; @@ -114,7 +115,7 @@ export const AuthList = GObject.registerClass({ const laters = global.compositor.get_laters(); laters.add(Meta.LaterType.BEFORE_REDRAW, () => { this._moveFocusToItems(); - return false; + return GLib.SOURCE_REMOVE; }); } } diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index f91ca770a..4441834f2 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -208,7 +208,7 @@ const UserList = GObject.registerClass({ const laters = global.compositor.get_laters(); laters.add(Meta.LaterType.BEFORE_REDRAW, () => { this._moveFocusToItems(); - return false; + return GLib.SOURCE_REMOVE; }); } } diff --git a/js/ui/dash.js b/js/ui/dash.js index 11a9aecc9..66b3b4a90 100644 --- a/js/ui/dash.js +++ b/js/ui/dash.js @@ -264,7 +264,7 @@ class ShowAppsIcon extends DashItemContainer { const laters = global.compositor.get_laters(); laters.add(Meta.LaterType.BEFORE_REDRAW, () => { AppFavorites.getAppFavorites().removeFavorite(id); - return false; + return GLib.SOURCE_REMOVE; }); return true; @@ -978,7 +978,7 @@ export const Dash = GObject.registerClass({ appFavorites.moveFavoriteToPos(id, favPos); else appFavorites.addFavoriteAtPos(id, favPos); - return false; + return GLib.SOURCE_REMOVE; }); return true; diff --git a/js/ui/main.js b/js/ui/main.js index 2e85dcebf..c8cf0c9bb 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -944,7 +944,7 @@ function _queueBeforeRedraw(workId) { const laters = global.compositor.get_laters(); laters.add(Meta.LaterType.BEFORE_REDRAW, () => { _runBeforeRedrawQueue(); - return false; + return GLib.SOURCE_REMOVE; }); } } diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 2dcfbac30..66bbe66b0 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -225,12 +225,12 @@ class WorkspaceTracker { if (!Meta.prefs_get_dynamic_workspaces()) { this._checkWorkspacesId = 0; - return false; + return GLib.SOURCE_REMOVE; } // Update workspaces only if Dynamic Workspace Management has not been paused by some other function if (this._pauseWorkspaceCheck) - return true; + return GLib.SOURCE_CONTINUE; for (i = 0; i < this._workspaces.length; i++) { const lastRemoved = this._workspaces[i]._lastRemovedWindow; @@ -290,7 +290,7 @@ class WorkspaceTracker { } this._checkWorkspacesId = 0; - return false; + return GLib.SOURCE_REMOVE; } keepWorkspaceAlive(workspace, duration) {